package com.xc.tjise.TJISE.day04;

public class Division {
    public int x;
    int y;



    int div() {
        return x / y;
    }
//用来给x y 赋值的
    public int getX() {
        return x;
    }

    public void setX(int x){
        this.x = x;
    }



    public int getY() {
        return y;
    }

    public void setY(int y){
        if (y==0){
            System.out.println("/ By Zero");
            System.exit(1);
        }
        else {
            this.y = y;
        }
    }


}
  class  DivTest {
        public static void main(String[] args) {
            Division division=new Division();
            division.x=100;
            division.y=2;
            System.out.println(division.div());
        }


}
